1. Field of the Invention
The present invention relates to a method of calculating temporal information of frame-based audio stream data, and more particularly, to a method of calculating temporal information of frame-based audio stream data, in which time related information depending on the playback of stream data can be calculated even when bitrate or timetable information is not included in header information when audio or voice stream data having a frame format are played back.
2. Background of the Related Art
An audio signal encoded as a digital signal is stored in digital storage media such as CD, DVD and MP3 player. The digital signal temporarily stored in a buffer included in a playback apparatus is decoded into an audio signal by a decoder and is then output.
Recently, as audio storage media are developed and various types of players are commercialized, a variety of methods of selectively playing back and repeating the signal included in the storage media and performing fast forward and fast rewind on the signal have been disclosed.
In the related arts, a playback time of the whole file, a temporal location of a specific part, a current playback time and the like are calculated using bitrate information included in header information of a coded digital signal. Information on a playback state is provided to a user by displaying back them on a Liquid Crystal Display (LCD). That is, in the case where bitrate information is included in the frame header such as a CBR (Constant Bitrate)-encoded MP3 file, a total playback time of an audio file can be easily calculated using bitrate information and file size information.
Furthermore, even in the case of a VBR (Variable Bitrate)-encoded file, a total playback time can be easily calculated using information on a total frame count, a playback time or the like, which is included in an additional header, if any.
However, in the case of an audio stream whose size is varied every frame or a frame-based audio stream not having bitrate information, etc. such as VBR not having additional header information or a packet stream, such as a total frame count and a timetable, which can calculate temporal information, it is difficult to calculate an accurate playback time.
In this case, to calculate information on the playback time, a total frame count constituting the audio stream is calculated by loading the entire files before playback.
FIG. 1 is a block diagram showing the structure of a timetable writing system in the related art. According to the related art, when an audio data file is streamed from a data storage unit 32 through a buffer memory or a cyclic buffer 25, a microcontroller or a timekeeper 22 calculates an elapsing playback time (T1) for each segment of audio data. A DSP memory or a linear buffer 11 receive an audio data stream from the cyclic buffer 25, and the linear buffer 11 includes a time length (ΔT) of the audio data. To calculate and display an elapsing playback time (T2) which is input from the linear buffer 11 to a decoding DSP decoder 12, the time keeper 11 monitors the time length (ΔT) of the audio data included in the linear buffer 11 based on the elapsing playback time (T1) of the audio data output from the cyclic buffer 25. Therefore, the elapsing playback time (T2) designates an elapsing playback time of an audio data file for audio data that are currently decoded by the DSP decoder 12.
However, to load the entire files before the audio stream is played back as described above, an additional data loading time is required and additional power is consumed. Therefore, a standby time necessary for playback is lengthened and power consumption in a compact player is increased. Therefore, there is a disadvantage in that an available battery time is reduced. And, in a case packet stream, such as PD stream or DMB stream, it is hard to get the information of playback time and time control because it is difficult to estimate total stream size.